﻿<presentation:UserControlView x:Class="Chronos.Client.Win.Views.PerformanceCounters.View"
                              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                              xmlns:presentation="clr-namespace:Rhiannon.Windows.Presentation;assembly=Rhiannon.Windows"
                              xmlns:controls="clr-namespace:Chronos.Client.Win.Controls"
							  xmlns:commanding="clr-namespace:Rhiannon.Windows.Presentation.Commands;assembly=Rhiannon.Windows"
                              x:Uid="Profiler_PerformanceCountersView">
    <Grid>
		<Grid.RowDefinitions>
			<RowDefinition Height="*" />
			<RowDefinition Height="Auto" />
		</Grid.RowDefinitions>
        <ScrollViewer Grid.Row="0">
			<ItemsControl ItemsSource="{Binding PerformanceCounters}">
				<ItemsControl.ItemTemplate>
					<DataTemplate>
						<controls:PerformanceCounterGraph ProcessInfo="{Binding DataContext.ProcessInfo, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type presentation:UserControlView}}}" PerformanceCounter="{Binding}" />
					</DataTemplate>
				</ItemsControl.ItemTemplate>
			</ItemsControl>
		</ScrollViewer>
		<Button Grid.Row="1" Content="Refresh" commanding:Event.Command="{Binding RefreshCountersCommand}" />
	</Grid>
</presentation:UserControlView>
